<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>品优购全端项目</title>
    <link rel="stylesheet" href="/lib/mui/css/mui.css">
    <link rel="stylesheet" href="/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/category.css">
</head>

<body>
    <!-- 头部 -->
    <header class="pyg_header">
        <div class="mui-input-row mui-search">
            <input type="search" class="mui-input-clear" placeholder="">
        </div>
    </header>
    <div class="pyg_view">
        <div class="left">
            <ul>
                    <!-- getCategories占坑 -->
            </ul>
        </div>
        <div class="right"></div>
    </div>
    <!-- 底部 -->
    <footer class="pyg_footer">
        <a href="/index.html">
            <span class="fa fa-home"></span>
            <span class="link-name">首页</span>
        </a>
        <a href="/pages/category.html">
            <span class="fa fa-list-ul"></span>
            <span class="link-name">分类</span>
        </a>
        <a href="javascript:;">
            <span class="fa fa-shopping-cart"></span>
            <span class="link-name">首页</span>
        </a>
        <a href="javascript:;">
            <span class="fa fa-user-circle-o"></span>
            <span class="link-name">首页</span>
        </a>
    </footer>
</body>
<script src="/lib/mui/js/mui.js"></script>
<script src="/lib/arttemplate/template-web.js"></script>
<script src="/lib/zepto/zepto.js"></script>
<script src="/lib/iscroll/iscroll.js"></script>
<script src="/js/common.js"></script>
<script src="/js/category.js"></script>

<script type="text/template" id="getCategories">

    {{each data val index}} {{if index==0}}
    <li data-index="{{index}}" class="active">{{val.cat_name}}
    </li>
    {{else if index != 0}}
    <li data-index="{{index}}">{{val.cat_name}}</li>
    {{/if}} {{/each}}
</script>

<script type="text/template" id="getRightlist">
    <!-- 因为iscoll插件作用于第一个标签，所以用一个div包起来 -->
    <div>
    {{each data val index}}
    <div class="product">
        <div class="product-title">
            <span>{{val.cat_name}}</span>
            <span class="link"></span>
        </div>
        <div class="product-content">
                {{each val.children val2 index2}}
            <a href="/pages/good_list.html?cid={{val2.cat_id}}">
                <img src="{{$imports.icoUrl}}{{val2.cat_icon}}" alt="">
                <span>{{val2.cat_name}}</span>
            </a>
            {{/each}}
        </div>
    </div>
    {{/each}}
</div>
</script>

</html>